<include file="Public/Header" />

<!-- right content start  -->
<div class="content-right">
	<div class="content">
        <!-- operation start -->
        <div class="am-g">
            <button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus tree-submit-add" data-am-modal="{target: '#data-save-win'}"> {{:L('common_operation_add')}}</button>
        </div>
        <!-- operation end -->

        <!-- save win start -->
        <div class="am-popup am-radius" id="data-save-win">
			<div class="am-popup-inner">
				<div class="am-popup-hd">
					<h4 class="am-popup-title" data-add-title="{{:L('class_add_name')}}" data-edit-title="{{:L('class_edit_name')}}">{{:L('class_add_name')}}</h4>
					<span data-am-modal-close class="am-close">&times;</span>
				</div>
				<div class="am-popup-bd">
					<!-- form start -->
					<form class="am-form form-validation admin-save" action="{{:U('Admin/Class/Save')}}" method="POST" request-type="ajax-reload" request-value="">
						<div class="am-form-group">
							<label>{{:L('common_pid_text')}}</label>
							<select  class="am-radius c-p" name="pid" data-validation-message="{{:L('common_pid_format')}}">
								<option value="0">{{:L('common_select_level_one_choice')}}</option>
								<foreach name="list" item="v">
									<option value="{{$v.id}}">{{$v.name}}</option>
								</foreach>
							</select>
						</div>
						<div class="am-form-group">
							<label>{{:L('common_name_text')}}</label>
							<input type="text" placeholder="{{:L('common_name_text')}}" name="name" minlength="2" maxlength="16" data-validation-message="{{:L('common_name_format')}}" class="am-radius" required />
						</div>
						<div class="am-form-group">
							<label>{{:L('common_view_sort_title')}}</label>
							<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="0" required />
						</div>
						<include file="Lib/Enable" />
						<div class="am-form-group">
							<input type="hidden" name="id" />
							<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
						</div>
					</form>
					<!-- form end -->
				</div>
			</div>
		</div>
		<!-- save win end -->

        <!-- list start -->
		<div id="tree" class="m-t-15">
			<div class="m-t-30 t-c">
				<img src="__PUBLIC__/Common/Images/loading.gif" />
				<p>{{:L('common_form_loading_tips')}}</p>
			</div>
		</div>
		<!-- list end -->
	</div>
</div>
<!-- right content end  -->
		
<!-- footer start -->
<include file="Public/Footer" />
<!-- footer end -->
<script>
	Tree(0, "{{:U('Admin/Class/GetNodeSon')}}", 0);
</script>